home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / multipik.zip / MULTIPIK.INF < prev    next >
Text File  |  1991-10-15  |  2KB  |  62 lines

  1.  
  2.                    Multiple Selection ListBox for VB
  3.  
  4.                         Costas Kitsos 73667,1755
  5.  
  6.  
  7. Introduction:
  8.  
  9. I have only recently started looking into the possibility of creating a
  10. Multiple Selection ListBox in VB without the need for third party Custom
  11. Controls or other DLLs.
  12.  
  13. MULTIPIK contains a usable form of a Multiple Selection ListBox in the
  14. context of MiniApp for Trovadore's Home Trattoria, a fictional home delivery
  15. restaurant.  The MultiPick ListBox presents Trovadore's Entrees and
  16. the user can pick up to five from the ListBox. If the user marks more than
  17. five items, only the first five are used.
  18.  
  19.  
  20. Multiple Selection ListBoxes:
  21.  
  22. A Multiple Selection ListBox is a ListBox that allows the user to mark an
  23. array of items in the ListBox.  It's an extremely useful ListBox style since
  24. there are many occasions when a few choices are required.
  25.  
  26. As we know, VB doesn't offer a Multiple Selection ListBox Control. Creating
  27. a Multiple Selection ListBox is not an impossibility, though.  MULTIPIK
  28. demonstrates on method of creating such a ListBox.
  29.  
  30. MULTIPIK uses CreateWindow to create a Multiple Selection ListBox as a
  31. child window on the VB form.  Since VB windows are windows just like any
  32. other windows this is completely acceptable.  I used a VB ListBox, called
  33. DummyList for both form design puproses and as a guide to placing and
  34. sizing the Multiple Selection ListBox.  DummyList is made invisible as
  35. soon as during Form_Paint we determine it's measurements/placement.  It's 
  36. replaced by the Multiple Selection ListBox that is exactly the same size
  37. and at the same location as DummyList.
  38.  
  39. Of course, since this Multiple Selection ListBox is not actual VB Control
  40. we can't trap events such as Click, KeyPress, etc.  MULTIPIK shows you an
  41. alternative way of getting the items we need.
  42.  
  43. The code is commented and should answer most of your questions.  
  44.  
  45.  
  46. Using MULTIPIK
  47.  
  48. To test MULTIPIK, open MULTIPIK.MAK and select RUN.  Choose up to 5 dishes
  49. from Trovadore's menu and click on OK.  A MsgBox will pop up displaying your
  50. selections and MULTIPIK will end.  The limitation of 5 dishes is only there
  51. for the purpose of this demo, there's certainly no such limitation in
  52. Multiple Selection ListBoxes.
  53.  
  54. If you have any comments or make any improvements don't hesitate to contact
  55. me through CompuServe Mail or on the MSBASIC forum.
  56.  
  57.  
  58. Enjoy!
  59. Costas Kitsos
  60. October 1991
  61.  
  62.